package com.woniu.backstage.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.backstage.entity.TbManager;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author spirit
 * @since 2020-04-15
 */
public interface TbManagerMapper extends BaseMapper<TbManager> {

    /**
     * 查询所有管理员
     * @return
     */
    @Select("select * from tb_manager")
    List<TbManager> getManagers();

    @Select("select * from tb_manager where root_username=#{username} and root_password=#{password}")
    TbManager getManager(@Param("username") String username, @Param("password") String password);
}
